home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
utils
/
vecanim
/
vecbuild.doc
< prev
next >
Wrap
Text File
|
1994-07-31
|
12KB
|
303 lines
VECTOR BUILDER
Version 0.9
Guide to Building New Objects
Copyright (c) 1994 - Bjarke Viksoe
All Rights Reserved
Shareware Version
Released july 1994!
────────────────────────────────────────────────────────────────────────────
Table of Contents
────────────────────────────────────────────────────────────────────────────
1. Introduction
2. Hardware and Software Requirements
3. How it works
4. The File Format
5. How to Build Your Own Animation
6. The End
────────────────────────────────────────────────────────────────────────────
1. Introduction
────────────────────────────────────────────────────────────────────────────
So this is the program where you can build up your animations. But why
isn't this piece of program not within the actual animator?
That's because you cannot change the structure of your animation once
you start adding more frames to it. Adding more polygons to an animation
with more that one frame isn't possible! The VECTOR BUILDER only accepts
animations with ONE frame. So plan your animations carefully before you
go ahead and do the actual animations.
But of course you can store and retrieve, modify and add more polygons
to an animations as long as there are only 1 frame. This can be done
in this program, the VECTOR BUILDER.
Creation of animations seems a bit tricky and boring.
Anyway, this wasn't really ment to be a simple animation program. This is
a program for game development or demo creation.
People how find this program usefull should mail me for the source-code to
make their own, much better and improved, editor to their games or demos.
────────────────────────────────────────────────────────────────────────────
2. Hardware and Software Requirements
────────────────────────────────────────────────────────────────────────────
VECTOR BUILDER requires version 3.20 or higher version of MS- or PC-DOS,
an IBM or compatible 80386 or above computer with a VGA adapter, a
Microsoft or compatible 2-button mouse, and some 2Mb of memory.
The program works best with a hard disk drive and disk caching,
which improves file save/retrieve performance and a computer using VESA bus
architecture which greatly improves the video performance. Slow VGA cards
are not recommended.
Note that VECTOR BUILDER utilize a tweaked 320x200 256-color screen for
flicker-free screen updates! Your VGA card must support this - and most do!
If you experience any trouble with this software they are encouraged to
notify the developer.
────────────────────────────────────────────────────────────────────────────
3. How it works
────────────────────────────────────────────────────────────────────────────
The Object Builder looks a bit like the Animator part. First you see
the "DISK" button on the menu. Clicking this only two possible choises
can be activated (for now). "New Anim" creates a brand new animation and
"Load Anim" retrieves an animation from disk.
The uppper right part of the menu is just as boring as in the Animator.
Use "Edit" to enter the editor screen once you have created a face.
The lower part of the menu has 3 buttons. One for creating the objects,
one for creating new faces and another for deleting stuff.
You can only save your animation when you have one or more points in
your animation.
The editor screen look pretty much the same as in the VECTOR ANIMATOR.
Read the documentation in the "VECANIM.DOC" documentation file to
figure out what it does or enjoy the "5. How to Build Your Own Animation"
section below to get an introduction to a builder's guide to the
vector wonder.
────────────────────────────────────────────────────────────────────────────
4. The File Format
────────────────────────────────────────────────────────────────────────────
There is a few limitations to this program:
{it can max handle 500 frames}
MAXFRAMES = 500;
{when you create your first frame you shouldn't make more than 200
faces and objects}
MAXFACES = 200;
{it can only handle 600 coordinates which should be enough for most
objects}
MAXCOORDS = 600;
The actual .ANI file is divided into several chunks. First there is the
header chunk, which describe the animation title, number of frames, number
of faces/objects and the number of coordinates for one frame.
Next is the face chunk. Here all static information about faces/objects are
stored. This is names, colours and number of coordinates used by the face.
Faces are stored one by one as an array of face-records. The number of
records in this array can be found in the integer "total_faces" in the
header-chunk.
Then there is the frame chunk. It descibes characteristics about every
frame. Currently only one piece of information is stored here -
the number of steps to be calculated between the frame and the next frame
in sequence.
Next is the "Instance" chunk. It store information of how faces changes
from one frame to another. Faces might become invisible or change their
z-value. There is one instance-record for every face saved in the
face-chunk.
Finally comes the coordinates. They are listed in big arrays starting
with index 1. This should match the data in the face-chunk. "Start_Coord"
is the index where a polygons coordinates start and "Number_coords" is
the amount of coordinates from that it uses.
Eg. a face has "Start_coord" set to 2 and "Number_coords" is 4. This
should turn into a square polygon formed from the points (p2,p3), (p3,p4),
(p4,p5) and (p5,p2) when rendered on the display.
The amount of coordinate-pairs stored in this chunk can be read in the
header-chunk under "total_coords".
Each chunk is separated by an identifier string. It is NOT a Pascal or
C null-string, but simply an array of characters.
The .ANI file consist of:
1. An identifying string: "VEC-ANIM"
1.1 The animation header:
{format version - currently only #1 is supported}
version : byte;
{date: month,day,year of last saved time-stamp}
m,d,y : word;
{animation title Pascal-string - max 12 chars}
title : nametype;
{this is the replay rate = number of screen-updates/second}
rate : integer;
{number of frames in whole animation}
total_frames : integer;
{total number of faces and objects in a single frame}
total_faces : integer;
{next is the number of coordinates used for a single frame}
total_coords : integer;
{set next pointer to NIL}
face : pFaceArray;
{and also this to NIL}
frame : pFrameRec;
{this is a colour array starting with colour #0 and ending with
number 255. Colours are split up into their R,G and B values which
range between 0 and 63}
rgb : array[1..256*3] of byte;
2.1 Face-identifyer: "FACES"
2.2 Faces array of "total_faces" records:
{name of the face in a Pascal string[12]}
name : nametype;
{type of face: face or object}
FaceType : facemodes;
{hierachy}
parent,brother,child : integer;
{actual RGB color index (0=color #0, 1=color #1 and so on...
To find the RGB-values in the header RGB-array use: (color*3)+1}
color : byte;
{color to drawn with in editor. Range between 0 and 15. Uses
BGI colour-constants. 0=black and 15=white!}
vcolor : byte;
{polygons coordinates should be taken from coordinate-array from
index "start_coord" and count "number_coords" coordinates}
start_coord : integer;
number_coords : integer;
3.1 Frame-identifyer: "FRAME"
3.2 Frames:
{number of steps between frames}
step : integer
4.1 Instace identifying string: "INSTANCE"
4.2 Instances are stored as an array of "total_faces" records. "total_faces"
can be found in the header-chunk.
{Is this instance of the face visible?}
visible : boolean;
{z-coord}
z : integer;
5.1 Coord identifying string: "COORD"
5.2 Finally the coordinates are stored:
{coords are store in a array of integers. One coord-pair after
another. Look in the header under "total_coords" for the actual
number of coords stored in this chuck}
x,y : integer;
6. End-string: "END"
Now this was the file-format for a single-framed animation. If you wish
to have more frames (that is, you wish to read a file containing more
frames) this is the way to do it:
A. Look for steps 1. to 2.2 as usual
B. For every frame do 3.1 and 3.2
C. For every frame do 4.1 and 4.2
D. For every frame do 5.1 and 5.2
E. Finally do step 6.
────────────────────────────────────────────────────────────────────────────
5. How to Build Your Own Animation
────────────────────────────────────────────────────────────────────────────
The best way to go about making a new animation is to draw a sketch on a
piece of paper. Draw a sketch of the frame. Make sure you have all possible
polygons plotted down. Also line out how many points each polygon should
have.
Load the "VECTOR BUILDER" and choose "New Anim" under "Disk". You are now
prompted for a title.
Start by adding the objects you find obvious. Making objects helps you
with grouping faces, but might slow down the selection stage for
individual faces.
When all objects are placed, create the first face. "Add face" will ask
you for a name and the number of coordinates your polygon needs. When
you have entered new values for this, a blue circle (depending on
the number of coords you have chosen) will pop up on your display-screen.
This is a template of your face. You should alter its form later.
Jump to the Editor Screen. Choose "VIEW" and find your new face in the
list. Choose it and change colour and editor colour. You should also change
the z-value while you're at it.
Leave the "VIEW" window. The newly created face has its points selected
on the wire-frame display, but still looks a bit funny. You can now
"EDIT" the points to look what you had in mind.
Go back to the main screen and create a new face and return to
the editor screen for editing. Do so for all faces.
While editing new faces you should check once in a while to see if it
looks all right in the final frame (by "SHOW"ing the animation).
Remember the difference between the two screen resolutions.
When done save the animation under "Save Anim" at the "Disk" option.
Load the VECTOR ANIMATOR and start animating!
Happy animating...
────────────────────────────────────────────────────────────────────────────
6. The End
────────────────────────────────────────────────────────────────────────────
The Builder was coded in a single day and might still be quite buggy.
Most of the stuff done, has to do with really strange pointer-operations.
It was allmost impossible to keep track of everything.
Anyway, if you manage to create anything useful with these programs, send
a sample to me. I would be really happy then.
How to contact me:
If you for any reason wish to contact me, write to:
Bjarke Viksoe
Norrebred 139
2625 Vallensbaek
Denmark
Or e-mail me in 1994 to : dat92230@rix02.lyngbyes.dk
┌───────────────────────────┐
│Wanna beat orgasm │ Bjarke Viksoe
│ try bit-pushing│ dat92230@rix02.lyngbyes.dk
└───────────────────────────┘